package acceso_a_datos;

public class ArbolBinarioMain {

	public static void main (String [] args){
		
		ArbolBinario b123 = new ArbolBinario();
		b123.build123a(); System.out.print("1a). build123a(): "); b123.printTree();
		b123.build123b(); System.out.print("\n1b). build123b(): "); b123.printTree();
		b123.build123c(); System.out.print("\n1c). build123a(): "); b123.printTree();
		
		ArbolBinario a = new ArbolBinario();
		ArbolBinario b = new ArbolBinario();
		ArbolBinario c = new ArbolBinario();
		
		for (int i=0; i<10; i++){
			a.insert((int)(Math.random()*100));
		}
		
		for (int j=0; j<10; j++){
			b.insert((int)(Math.random()*100));
		}
		
		System.out.println("\n2).  size(): " + a.size());
		System.out.println("3).  maxDepth(): " + a.maxDepth());
		System.out.println("4a). minValue(): " + a.minValue());
		System.out.println("4b). maxValue(): " + a.maxValue());
		System.out.print("5).  printTree(): "); a.printTree();
		System.out.print("\n6).  printPostOrder(): "); a.printPostOrder();
		System.out.println("7).  hasPathSum(100): " + a.hasPathSum(100) + " | hasPathSum(250): " + a.hasPathSum(250));
		System.out.println("8).  printPaths(): "); a.printPaths();
		System.out.print("9).  mirror(): " ); a.mirror(); a.printTree(); a.mirror();
		System.out.print("\n10). doubleTree(): "); a.doubleTree(); a.printTree();
		System.out.println("\n11). sameTree(): " + a.sameTree(b));
		System.out.println("12). countTrees(5): " + c.countTrees(5));
		System.out.println("13). isBST1(): " + a.isBST1());
		System.out.println("14). isBST2(): " + a.isBST2());
	}
	
}
